<template>
	<div class="mine">
		<div class="box">
			<div class="hearderBox">
				<div class="hearderBoxIcon" @click="goBack">
					<img src="../../assets/images/fanhuijiantou.png" alt="">
				</div>
				{{$t('indexTitle.title328')}}
				<!-- <div class="vipjilu" @click="goNextPage('/vipRecord')">
					{{$t('indexTitle.title169')}}
				</div> -->
			</div>

			<div class="proList">
				<div class="header_group">
					<div class="rebate-button" @click="getlingqu">{{$t('indexTitle.title329')}} {{info.fs_money||0}}
						{{$t('indexTitle.title330')}}</div>
					<div class="rebate-list">
						<div class="rebate-items">
							{{$t('indexTitle.title331')}}<span>{{info.fs_zz||0}}</span>
						</div>
						<div class="rebate-items">
							{{$t('indexTitle.title332')}}<span>{{info.fs_ty||0}}</span>
						</div>
						<div class="rebate-items">
							{{$t('indexTitle.title333')}}<span>{{info.fs_dz||0}}</span>
						</div>
						<div class="rebate-items">
							{{$t('indexTitle.title334')}}<span>{{info.fs_qp||0}}</span>
						</div>
						<div class="rebate-items">
							{{$t('indexTitle.title338')}}<span>{{info.fs_by||0}}</span>
						</div>
						<div class="rebate-items">
							{{$t('indexTitle.title339')}}<span>{{info.fs_dj||0}}</span>
						</div>
						<div class="rebate-items">
							{{$t('indexTitle.title340')}}<span>{{info.fs_dwdj||0}}</span>
						</div>
					</div>
				</div>
				<div class="txt_group">
					<h2>{{$t('indexTitle.title335')}}</h2>
					<ul>
						<li style="white-space: break-spaces;">
							<span>1.</span>{{$t('indexTitle.title336')}}
						</li>
						<li style="white-space: break-spaces;">
							<span>2.</span>{{$t('indexTitle.title337')}}
						</li>
					</ul>
				</div>
			</div>
		</div>
		<loadingFour :msgText="msgTextTow" v-if="isShowLoadingTeow" @closeGuanbiTow="closeGuanbi"></loadingFour>
	</div>
</template>

<script>
	import {
		userinfo,
		fsnow
	} from "../../utils/api.js"
	import loadingFour from '../../components/loadingFour.vue';
	export default {
		data() {
			return {
				isShowVipLe: 0,
				isJIfenShow: false,
				info: [],
				msgTextTow: "",
				isShowLoadingTeow: false
			}
		},
		components: {
			loadingFour
		},
		created() {},
		mounted() {
			this.getuserinfo()
		},
		methods: {
			closeGuanbi(e) {
				this.isShowLoadingTeow = false;
			},
			getuserinfo() {
				this.info = [];
				userinfo().then((res) => {
					if (res.status.errorCode == 0) {
						this.info = res.data
					} else if (res.status.errorCode == 401) {
						console.log('401')
					} else {
						// this.$message.error(res.status.msg);
						this.msgTextTow = res.status.msg;
						this.isShowLoadingTeow = true;
						setTimeout(() => {
							this.isShowLoadingTeow = false;
						}, 2000)
						// this.$message({
						// 	showClose: true,
						// 	message: res.status.msg,
						// 	type: 'error'
						// });
					}
				}).catch((err) => {
					console.log(err, 'err')
				});
			},
			getlingqu() {
				fsnow().then((res) => {
					if (res.status.errorCode == 0) {
						this.getuserinfo()
					} else if (res.status.errorCode == 401) {
						console.log('401')
					} else {
						// this.$message.error(res.status.msg);
						this.msgTextTow = res.status.msg;
						this.isShowLoadingTeow = true;
						setTimeout(() => {
							this.isShowLoadingTeow = false;
						}, 2000)
						// this.$message({
						// 	showClose: true,
						// 	message: res.status.msg,
						// 	type: 'error'
						// });
					}
				}).catch((err) => {
					console.log(err, 'err')
				});
			},
			getSelVipLever(num) {
				this.isShowVipLe = num;
			},
			getShowJifen() {
				this.isJIfenShow = !this.isJIfenShow;
			},
			goNextPage(page) {
				this.$router.push(page)
			},
			goBack() {
				this.$router.go(-1)
			}
		}
	}
</script>

<style scoped>
	* {
		box-sizing: border-box;
	}

	.mine {
		height: 90vh;
		overflow-y: auto;
		overflow-x: hidden;
		padding-top: calc(constant(safe-area-inset-top) + 0px);
		padding-top: calc(env(safe-area-inset-top) + 0px);
		padding-bottom: calc(constant(safe-area-inset-bottom) + 85px);
		padding-bottom: calc(env(safe-area-inset-bottom) + 85px);
		box-sizing: border-box;
		position: fixed;
		z-index: 1;
		background-color: #f3faff;
		-webkit-overflow-scrolling: touch;
		width: 100%;
	}

	.box {
		background-color: #f3faff;
		display: flex;
		flex-direction: column;
		/* min-height: 100vh; */
	}

	.buttons {
		position: fixed;
		bottom: 10%;
		right: 10px;
		background-color: #99D2E3;
		width: 60px;
		height: 60px;
		border-radius: 50%;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.buttons img {
		width: 32px;
		height: 32px;
	}


	.hearderBox {
		width: 100%;
		height: 45px;
		background-color: #fff;
		position: fixed;
		top: 0;
		font-weight: 300;
		line-height: 45px;
		text-align: center;
		font-size: 20px;
		color: #545658;
		box-shadow: inset 0 -1px 0 #ececec;
		left: 0;
		overflow: hidden;
		z-index: 99;
	}

	.hearderBoxIcon {
		width: 50px;
		position: fixed;
		top: 3px;
		left: 0px;
	}

	.hearderBoxIcon img {
		width: 20px;
		height: 20px;
	}

	.vipjilu {
		position: fixed;
		top: 0px;
		right: 10px;
		font-size: 13px;
		color: #545658;
	}

	.proList {
		width: 100%;
		padding: 45px 0px 0;
	}

	.header_group {
		padding: 12px 20px 0px;
		background-color: #f3faff;
	}

	.rebate-button {
		display: flex;
		width: 100%;
		align-items: center;
		justify-content: center;
		margin-bottom: 20px;
		border: 1px solid #7f7f7f;
		background: #fff;
		border-radius: 12px;
		line-height: 40px;
		color: #000;
		font-size: 14px;
	}

	.rebate-list {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
	}

	.rebate-items {
		background-color: hsla(0, 0%, 100%, .7);
		padding: 20px 10px;
		border-radius: 9px;
		margin-bottom: 10px;
		flex-basis: 48%;
		font-size: 15px;
		color: #333;
	}

	.rebate-items span {
		font-weight: 500;
		margin-right: 5px;
	}

	.txt_group {
		color: #4a4a4a;
		background-color: #fff;
		border-radius: 8px;
		padding: 17px 1rem 17px;
		width: 96%;
		margin: 0 auto;
	}

	.txt_group h2 {
		margin-bottom: 1rem;
		font-weight: 300;
		color: #4a4a4a;
		margin: 0 0px 15px;
		font-size: 20px;
	}

	li,
	ol,
	ul {
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.txt_group ul li {
		display: flex;
		font-size: 14px;
		color: #4a4a4a;
		margin-bottom: 1rem;
	}

	.txt_group ul li:last-child {
		margin-bottom: 0;
	}

	.txt_group ul li span {
		min-width: 24px;
		white-space: nowrap;
	}
</style>